
package com.netease.xone.widget.tabview;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.TextView;

import com.netease.xone.R;

/**
 * 详情页评论列表使用的tab
 * 
 * @author MR
 */
public class ViewInformationCommentTab extends AbsTabView {

    public ViewInformationCommentTab(Context context) {
        super(context);
    }

    public ViewInformationCommentTab(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    public int getTabCount() {
        return 3;
    }

    @Override
    public int getTabDividerStyle() {
        return DIVIDER_MIDDLE;
    }

    @Override
    public int getTabDividerResource() {
        return R.drawable.bg_comment_tab_divider;
    }

    @Override
    public View getTabView(int index) {
        TextView tv = (TextView)View.inflate(mContext, R.layout.test_view_information_comment_tab,
                null);
        tv.setClickable(true);
        if (index == 0) {
            tv.setText("评论(25)");
        } else if (index == 1) {
            tv.setText("转发(100)");
        } else if (index == 2) {
            tv.setText("赞(1)");
        }
        return tv;
    }

}
